-- @owner: z@wan005
-- @date: 2023/5/18
-- @testpoint: compress函数作为关键字测试
@connect PrimaryDbBmode;
--step1:查询系统表;expect:compress为非保留关键字
select * from pg_get_keywords() where word ='compress';
--step2:作为数据库名;expect:成功
set dolphin.b_compatibility_mode = off;
drop database if exists compress;
create database compress dbcompatibility 'B';
drop database if exists compress;
reset dolphin.b_compatibility_mode;
--step3:作为列名和表名;expect:成功
drop table if exists compress;
create table compress(compress timestamp);
drop table if exists compress;
--step4:作为外部数据源名;expect:成功
drop data source if exists compress;
create data source compress;
drop data source if exists compress;
--step5:作为自定义函数名;expect:成功
drop function if exists compress(i integer);
create function compress(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
drop function if exists compress(i integer);
--step6:作为用户名;expect:成功
drop user if exists compress;
create user compress password 'Test_123';
drop user if exists compress;